﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Form1.aspx.cs" Inherits="Demo.Form.Form1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">

        function CheckFile() {

            var needUploadName = $("#needUploadName").val();
            if ($("#chkSMSJ", frames["iframeEMS"].document).get(0) != undefined) {
                var checlsmsj = $("#chkSMSJ", frames["iframeEMS"].document).get(0).checked;
                var checlsjsm = $("#chkSJSM", frames["iframeEMS"].document).get(0).checked;

                if (needUploadName != "") {
                    alert(needUploadName + "材料的表格为必须件，请上传附件材料。");
                    return false;
                } else {
                    if ($("#isEMSshow").val() == "1") {

                        if (!checlsmsj && !checlsjsm) {
                            if (!confirm("您没有选择邮寄服务，是否继续？")) {
                                return false;
                            }

                        } else if (!confirm("是否确定提交申报吗？")) {
                            return false;

                        } else if (checlsmsj || checlsjsm) {


                            if (checlsmsj) {

                                var LinkPerson = $("#txtSMSJLinkPerson", frames["iframeEMS"].document).val();
                                var SMSJPhone = $("#txtSMSJPhone", frames["iframeEMS"].document).val();
                                var SMSJAddress = $("#txtSMSJAddress", frames["iframeEMS"].document).val();
                                var SMSJYB = $("#txtSMSJYB", frames["iframeEMS"].document).val();

                                if (LinkPerson == "" || SMSJPhone == "" || SMSJAddress == "" || SMSJYB == "") {
                                    alert("请确认输入邮寄信息全部填写");
                                    return false;
                                }

                            }

                            if (checlsjsm) {

                                var SJSMLinkPerson = $("#txtSJSMLinkPerson", frames["iframeEMS"].document).val();
                                var SJSMPhone = $("#txtSJSMPhone", frames["iframeEMS"].document).val();
                                var SJSMAddress = $("#txtSJSMAddress", frames["iframeEMS"].document).val();
                                var SJSMYB = $("#txtSJSMYB", frames["iframeEMS"].document).val();

                                if (SJSMLinkPerson == "" || SJSMPhone == "" || SJSMAddress == "" || SJSMYB == "") {
                                    alert("请确认输入邮寄信息全部填写");
                                    return false;
                                }

                            }

                            $("#btnsave", frames["iframeEMS"].document).get(0).click();
                        }

                    }

                    else {


                        if (!confirm("是否确定提交申报吗？")) {
                            return false;

                        } else {
                            if (checlsmsj || checlsjsm) {
                                $("#btnsave", frames["iframeEMS"].document).get(0).click();
                            }

                        }
                        if (document.frames["iframePage"] != undefined && document.frames["iframePage"].document.getElementById("btnSave") != null) {
                            document.frames["iframePage"].document.getElementById("btnSave").click();
                        }

                    }
                }
            }
            if (document.frames["iframePage"] != undefined && document.frames["iframePage"].document.getElementById("btnSave") != null) {
                document.frames["iframePage"].document.getElementById("btnSave").click();
            }
        }

    </script>
</head>
<body>
    <form runat="server" method="post">
    <p>
        客户名称:
        <input type="text" name="CustomerName" style="width: 300px" />
    </p>
    <p>
        客户电话:
        <input type="text" name="CustomerTel" style="width: 300px" />
    </p>
    <p>
        <input id="Checkbox1" type="checkbox" name="sex" value="1" />
    </p>
    <p>
        <input type="submit" value="提交" />
    </p>
    </form>
</body>
</html>
